<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Drag and Drop</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="gtkbase.html" title="Part II. GTK+核心参考">
<link rel="prev" href="gtk3-Clipboards.html" title="Clipboards">
<link rel="next" href="gtk3-Stock-Items.html" title="Stock Items">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-Clipboards.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-Stock-Items.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-Drag-and-Drop.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-Drag-and-Drop.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-Drag-and-Drop"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-Drag-and-Drop.top_of_page"></a>Drag and Drop</span></h2>
<p>Drag and Drop</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-Drag-and-Drop.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

enum                <a class="link" href="gtk3-Drag-and-Drop.html#GtkDestDefaults" title="enum GtkDestDefaults">GtkDestDefaults</a>;
enum                <a class="link" href="gtk3-Drag-and-Drop.html#GtkTargetFlags" title="enum GtkTargetFlags">GtkTargetFlags</a>;

<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set" title="gtk_drag_dest_set ()">gtk_drag_dest_set</a>                   (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Drag-and-Drop.html#GtkDestDefaults" title="enum GtkDestDefaults"><span class="type">GtkDestDefaults</span></a> flags</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_targets</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragAction"><span class="type">GdkDragAction</span></a> actions</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set-proxy" title="gtk_drag_dest_set_proxy ()">gtk_drag_dest_set_proxy</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *proxy_window</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> protocol</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_coordinates</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-unset" title="gtk_drag_dest_unset ()">gtk_drag_dest_unset</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<a href="../gdk3/gdk3-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a>             <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-find-target" title="gtk_drag_dest_find_target ()">gtk_drag_dest_find_target</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *target_list</code></em>);
<a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> *     <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-get-target-list" title="gtk_drag_dest_get_target_list ()">gtk_drag_dest_get_target_list</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set-target-list" title="gtk_drag_dest_set_target_list ()">gtk_drag_dest_set_target_list</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *target_list</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-add-text-targets" title="gtk_drag_dest_add_text_targets ()">gtk_drag_dest_add_text_targets</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-add-image-targets" title="gtk_drag_dest_add_image_targets ()">gtk_drag_dest_add_image_targets</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-add-uri-targets" title="gtk_drag_dest_add_uri_targets ()">gtk_drag_dest_add_uri_targets</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set-track-motion" title="gtk_drag_dest_set_track_motion ()">gtk_drag_dest_set_track_motion</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> track_motion</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-get-track-motion" title="gtk_drag_dest_get_track_motion ()">gtk_drag_dest_get_track_motion</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-finish" title="gtk_drag_finish ()">gtk_drag_finish</a>                     (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> success</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> del</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-get-data" title="gtk_drag_get_data ()">gtk_drag_get_data</a>                   (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-get-source-widget" title="gtk_drag_get_source_widget ()">gtk_drag_get_source_widget</a>          (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-highlight" title="gtk_drag_highlight ()">gtk_drag_highlight</a>                  (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-unhighlight" title="gtk_drag_unhighlight ()">gtk_drag_unhighlight</a>                (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);

<a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="returnvalue">GdkDragContext</span></a> *    <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-begin" title="gtk_drag_begin ()">gtk_drag_begin</a>                      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *targets</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragAction"><span class="type">GdkDragAction</span></a> actions</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> button</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-set-icon-widget" title="gtk_drag_set_icon_widget ()">gtk_drag_set_icon_widget</a>            (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-set-icon-pixbuf" title="gtk_drag_set_icon_pixbuf ()">gtk_drag_set_icon_pixbuf</a>            (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-set-icon-stock" title="gtk_drag_set_icon_stock ()">gtk_drag_set_icon_stock</a>             (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-set-icon-surface" title="gtk_drag_set_icon_surface ()">gtk_drag_set_icon_surface</a>           (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../cairo/cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-set-icon-name" title="gtk_drag_set_icon_name ()">gtk_drag_set_icon_name</a>              (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-set-icon-default" title="gtk_drag_set_icon_default ()">gtk_drag_set_icon_default</a>           (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-check-threshold" title="gtk_drag_check_threshold ()">gtk_drag_check_threshold</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> start_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> start_y</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> current_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> current_y</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set" title="gtk_drag_source_set ()">gtk_drag_source_set</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> start_button_mask</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_targets</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragAction"><span class="type">GdkDragAction</span></a> actions</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-icon-pixbuf" title="gtk_drag_source_set_icon_pixbuf ()">gtk_drag_source_set_icon_pixbuf</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-icon-stock" title="gtk_drag_source_set_icon_stock ()">gtk_drag_source_set_icon_stock</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-icon-name" title="gtk_drag_source_set_icon_name ()">gtk_drag_source_set_icon_name</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-unset" title="gtk_drag_source_unset ()">gtk_drag_source_unset</a>               (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-target-list" title="gtk_drag_source_set_target_list ()">gtk_drag_source_set_target_list</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *target_list</code></em>);
<a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> *     <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-get-target-list" title="gtk_drag_source_get_target_list ()">gtk_drag_source_get_target_list</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-add-text-targets" title="gtk_drag_source_add_text_targets ()">gtk_drag_source_add_text_targets</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-add-image-targets" title="gtk_drag_source_add_image_targets ()">gtk_drag_source_add_image_targets</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-add-uri-targets" title="gtk_drag_source_add_uri_targets ()">gtk_drag_source_add_uri_targets</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-Drag-and-Drop.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="gtk3-Drag-and-Drop.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkDestDefaults"></a><h3>enum GtkDestDefaults</h3>
<pre class="programlisting">typedef enum {
  GTK_DEST_DEFAULT_MOTION     = 1 &lt;&lt; 0, /* respond to "drag_motion" */
  GTK_DEST_DEFAULT_HIGHLIGHT  = 1 &lt;&lt; 1, /* auto-highlight */
  GTK_DEST_DEFAULT_DROP       = 1 &lt;&lt; 2, /* respond to "drag_drop" */
  GTK_DEST_DEFAULT_ALL        = 0x07
} GtkDestDefaults;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkTargetFlags"></a><h3>enum GtkTargetFlags</h3>
<pre class="programlisting">typedef enum {
  GTK_TARGET_SAME_APP = 1 &lt;&lt; 0,    /*&lt; nick=same-app &gt;*/
  GTK_TARGET_SAME_WIDGET = 1 &lt;&lt; 1, /*&lt; nick=same-widget &gt;*/
  GTK_TARGET_OTHER_APP = 1 &lt;&lt; 2,   /*&lt; nick=other-app &gt;*/
  GTK_TARGET_OTHER_WIDGET = 1 &lt;&lt; 3 /*&lt; nick=other-widget &gt;*/
} GtkTargetFlags;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-set"></a><h3>gtk_drag_dest_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_set                   (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Drag-and-Drop.html#GtkDestDefaults" title="enum GtkDestDefaults"><span class="type">GtkDestDefaults</span></a> flags</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_targets</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragAction"><span class="type">GdkDragAction</span></a> actions</code></em>);</pre>
<p>
Sets a widget as a potential drop destination, and adds default behaviors.
</p>
<p>
The default behaviors listed in <em class="parameter"><code>flags</code></em> have an effect similar
to installing default handlers for the widget's drag-and-drop signals
(<span class="type">"drag-motion"</span>, <span class="type">"drag-drop"</span>, ...). They all exist
for convenience. When passing <span class="type">GTK_DEST_DEFAULT_ALL</span> for instance it is
sufficient to connect to the widget's <span class="type">"drag-data-received"</span>
signal to get primitive, but consistent drag-and-drop support.
</p>
<p>
Things become more complicated when you try to preview the dragged data,
as described in the documentation for <span class="type">"drag-motion"</span>. The default
behaviors described by <em class="parameter"><code>flags</code></em> make some assumptions, that can conflict
with your own signal handlers. For instance <span class="type">GTK_DEST_DEFAULT_DROP</span> causes
invokations of <a href="../gdk3/gdk3-Drag-and-Drop.html#gdk-drag-status"><code class="function">gdk_drag_status()</code></a> in the context of <span class="type">"drag-motion"</span>,
and invokations of <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-finish" title="gtk_drag_finish ()"><code class="function">gtk_drag_finish()</code></a> in <span class="type">"drag-data-received"</span>.
Especially the later is dramatic, when your own <span class="type">"drag-motion"</span>
handler calls <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-get-data" title="gtk_drag_get_data ()"><code class="function">gtk_drag_get_data()</code></a> to inspect the dragged data.
</p>
<p>
There's no way to set a default action here, you can use the
<span class="type">"drag-motion"</span> callback for that. Here's an example which selects
the action to use depending on whether the control key is pressed or not:
</p>
<div class="informalexample"><pre class="programlisting">
static void
drag_motion (GtkWidget *widget,
             GdkDragContext *context,
             gint x,
             gint y,
             guint time)
{
  GdkModifierType mask;

  gdk_window_get_pointer (gtk_widget_get_window (widget),
                          NULL, NULL, &amp;mask);
  if (mask &amp; GDK_CONTROL_MASK)
    gdk_drag_status (context, GDK_ACTION_COPY, time);
  else
    gdk_drag_status (context, GDK_ACTION_MOVE, time);
}
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>which types of default drag behavior to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
<td>a pointer to an array of <a class="link" href="gtk3-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>s
indicating the drop types that this <em class="parameter"><code>widget</code></em> will accept, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
Later you can access the list with <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-get-target-list" title="gtk_drag_dest_get_target_list ()"><code class="function">gtk_drag_dest_get_target_list()</code></a>
and <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-find-target" title="gtk_drag_dest_find_target ()"><code class="function">gtk_drag_dest_find_target()</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
<td>the number of entries in <em class="parameter"><code>targets</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>actions</code></em> :</span></p></td>
<td>a bitmask of possible actions for a drop onto this <em class="parameter"><code>widget</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-set-proxy"></a><h3>gtk_drag_dest_set_proxy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_set_proxy             (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *proxy_window</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> protocol</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_coordinates</code></em>);</pre>
<p>
Set up this widget to proxy drags elsewhere.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>proxy_window</code></em> :</span></p></td>
<td>window to which forward drag events</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
<td>Drag protocol which the dest widget accepts</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use_coordinates</code></em> :</span></p></td>
<td>If true, send the same coordinates to the
destination, because it is a embedded
subwindow.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-unset"></a><h3>gtk_drag_dest_unset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_unset                 (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Unregister this widget as a drag target.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-find-target"></a><h3>gtk_drag_dest_find_target ()</h3>
<pre class="programlisting"><a href="../gdk3/gdk3-Properties-and-Atoms.html#GdkAtom"><span class="returnvalue">GdkAtom</span></a>             gtk_drag_dest_find_target           (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *target_list</code></em>);</pre>
<p>
Looks for a match between the supported targets of <em class="parameter"><code>context</code></em> and the
<em class="parameter"><code>dest_target_list</code></em>, returning the first matching target, otherwise
returning <a href="../gdk3/gdk3-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a>. <em class="parameter"><code>dest_target_list</code></em> should usually be the return
value from <a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-get-target-list" title="gtk_drag_dest_get_target_list ()"><code class="function">gtk_drag_dest_get_target_list()</code></a>, but some widgets may
have different valid targets for different parts of the widget; in
that case, they will have to implement a drag_motion handler that
passes the correct target list to this function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>drag destination widget</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>drag context</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target_list</code></em> :</span></p></td>
<td>list of droppable targets, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use
gtk_drag_dest_get_target_list (<em class="parameter"><code>widget</code></em>). <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>first target that the source offers
and the dest can accept, or <a href="../gdk3/gdk3-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-get-target-list"></a><h3>gtk_drag_dest_get_target_list ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> *     gtk_drag_dest_get_target_list       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Returns the list of targets this widget can accept from
drag-and-drop.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-set-target-list"></a><h3>gtk_drag_dest_set_target_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_set_target_list       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *target_list</code></em>);</pre>
<p>
Sets the target types that this widget can accept from drag-and-drop.
The widget must first be made into a drag destination with
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set" title="gtk_drag_dest_set ()"><code class="function">gtk_drag_dest_set()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target_list</code></em> :</span></p></td>
<td>list of droppable targets, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-add-text-targets"></a><h3>gtk_drag_dest_add_text_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_add_text_targets      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Add the text targets supported by <span class="type">GtkSelection</span> to
the target list of the drag destination. The targets
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value, 
use <a class="link" href="gtk3-Selections.html#gtk-target-list-add-text-targets" title="gtk_target_list_add_text_targets ()"><code class="function">gtk_target_list_add_text_targets()</code></a> and
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set-target-list" title="gtk_drag_dest_set_target_list ()"><code class="function">gtk_drag_dest_set_target_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-add-image-targets"></a><h3>gtk_drag_dest_add_image_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_add_image_targets     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Add the image targets supported by <span class="type">GtkSelection</span> to
the target list of the drag destination. The targets
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value, 
use <a class="link" href="gtk3-Selections.html#gtk-target-list-add-image-targets" title="gtk_target_list_add_image_targets ()"><code class="function">gtk_target_list_add_image_targets()</code></a> and
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set-target-list" title="gtk_drag_dest_set_target_list ()"><code class="function">gtk_drag_dest_set_target_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-add-uri-targets"></a><h3>gtk_drag_dest_add_uri_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_add_uri_targets       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Add the URI targets supported by <span class="type">GtkSelection</span> to
the target list of the drag destination. The targets
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value, 
use <a class="link" href="gtk3-Selections.html#gtk-target-list-add-uri-targets" title="gtk_target_list_add_uri_targets ()"><code class="function">gtk_target_list_add_uri_targets()</code></a> and
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-dest-set-target-list" title="gtk_drag_dest_set_target_list ()"><code class="function">gtk_drag_dest_set_target_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-set-track-motion"></a><h3>gtk_drag_dest_set_track_motion ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_dest_set_track_motion      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> track_motion</code></em>);</pre>
<p>
Tells the widget to emit ::drag-motion and ::drag-leave
events regardless of the targets and the <code class="literal">GTK_DEST_DEFAULT_MOTION</code>
flag. 
</p>
<p>
This may be used when a widget wants to do generic
actions regardless of the targets that the source offers.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>track_motion</code></em> :</span></p></td>
<td>whether to accept all targets</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-dest-get-track-motion"></a><h3>gtk_drag_dest_get_track_motion ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_drag_dest_get_track_motion      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Returns whether the widget has been configured to always
emit ::drag-motion signals.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the widget always emits ::drag-motion events</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-finish"></a><h3>gtk_drag_finish ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_finish                     (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> success</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> del</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-get-data"></a><h3>gtk_drag_get_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_get_data                   (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Properties-and-Atoms.html#GdkAtom"><span class="type">GdkAtom</span></a> target</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);</pre>
<p>
Get the data for a drag or drop
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>drag context</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>format to retrieve the data in.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>timestamp of triggering event.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-get-source-widget"></a><h3>gtk_drag_get_source_widget ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_drag_get_source_widget          (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
<p>
Determines the source widget for a drag.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>a (destination side) drag context</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>if the drag is occurring
within a single application, a pointer to the source widget.
Otherwise, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-highlight"></a><h3>gtk_drag_highlight ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_highlight                  (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Highlight the given widget in the default manner.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-unhighlight"></a><h3>gtk_drag_unhighlight ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_unhighlight                (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Refresh the given widget to remove the highlight.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-begin"></a><h3>gtk_drag_begin ()</h3>
<pre class="programlisting"><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="returnvalue">GdkDragContext</span></a> *    gtk_drag_begin                      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *targets</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragAction"><span class="type">GdkDragAction</span></a> actions</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> button</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Initiates a drag on the source side. The function
only needs to be used when the application is
starting drags itself, and is not needed when
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set" title="gtk_drag_source_set ()"><code class="function">gtk_drag_source_set()</code></a> is used.
</p>
<p>
The <em class="parameter"><code>event</code></em> is used to retrieve the timestamp that will be used internally to
grab the pointer.  If <em class="parameter"><code>event</code></em> is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>, then GDK_CURRENT_TIME will be used.
However, you should try to pass a real event in all cases, since that can be
used by GTK+ to get information about the start position of the drag, for
example if the <em class="parameter"><code>event</code></em> is a GDK_MOTION_NOTIFY.
</p>
<p>
Generally there are three cases when you want to start a drag by hand by
calling this function:
</p>
<p>
1. During a button-press-event handler, if you want to start a drag
immediately when the user presses the mouse button.  Pass the <em class="parameter"><code>event</code></em>
that you have in your button-press-event handler.
</p>
<p>
2. During a motion-notify-event handler, if you want to start a drag
when the mouse moves past a certain threshold distance after a button-press.
Pass the <em class="parameter"><code>event</code></em> that you have in your motion-notify-event handler.
</p>
<p>
3. During a timeout handler, if you want to start a drag after the mouse
button is held down for some time.  Try to save the last event that you got
from the mouse, using <a href="../gdk3/gdk3-Events.html#gdk-event-copy"><code class="function">gdk_event_copy()</code></a>, and pass it to this function
(remember to free the event with <a href="../gdk3/gdk3-Events.html#gdk-event-free"><code class="function">gdk_event_free()</code></a> when you are done).
If you can really not pass a real event, pass <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a> instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>the source widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
<td>The targets (data formats) in which the
source can provide the data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>actions</code></em> :</span></p></td>
<td>A bitmask of the allowed drag actions for this drag.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
<td>The button the user clicked to start the drag.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event that triggered the start of the drag.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the context for this drag. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-set-icon-widget"></a><h3>gtk_drag_set_icon_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_set_icon_widget            (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);</pre>
<p>
Changes the icon for a widget to a given widget. GTK+
will not destroy the icon, so if you don't want
it to persist, you should connect to the "drag-end" 
signal and destroy it yourself.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>the context for a drag. (This must be called
with a  context for the source side of a drag)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a toplevel window to use as an icon.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></p></td>
<td>the X offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></p></td>
<td>the Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-set-icon-pixbuf"></a><h3>gtk_drag_set_icon_pixbuf ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_set_icon_pixbuf            (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);</pre>
<p>
Sets <em class="parameter"><code>pixbuf</code></em> as the icon for a given drag.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>the context for a drag. (This must be called
with a  context for the source side of a drag)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
<td>the <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> to use as the drag icon.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></p></td>
<td>the X offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></p></td>
<td>the Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-set-icon-stock"></a><h3>gtk_drag_set_icon_stock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_set_icon_stock             (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);</pre>
<p>
Sets the icon for a given drag from a stock ID.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>the context for a drag. (This must be called
with a  context for the source side of a drag)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
<td>the ID of the stock icon to use for the drag.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></p></td>
<td>the X offset within the icon of the hotspot.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></p></td>
<td>the Y offset within the icon of the hotspot.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-set-icon-surface"></a><h3>gtk_drag_set_icon_surface ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_set_icon_surface           (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><a href="../cairo/cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
<p>
Sets <em class="parameter"><code>surface</code></em> as the icon for a given drag. GTK+ retains
references for the arguments, and will release them when
they are no longer needed.
</p>
<p>
To position the surface relative to the mouse, use
<a href="../cairo/cairo-cairo-surface-t.html#cairo-surface-set-device-offset"><code class="function">cairo_surface_set_device_offset()</code></a> on <em class="parameter"><code>surface</code></em>. The mouse
cursor will be positioned at the (0,0) coordinate of the
surface.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>the context for a drag. (This must be called
with a context for the source side of a drag)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
<td>the surface to use as icon</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-set-icon-name"></a><h3>gtk_drag_set_icon_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_set_icon_name              (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> hot_y</code></em>);</pre>
<p>
Sets the icon for a given drag from a named themed icon. See
the docs for <a class="link" href="gtk3-GtkIconTheme.html#GtkIconTheme" title="struct GtkIconTheme"><span class="type">GtkIconTheme</span></a> for more details. Note that the
size of the icon depends on the icon theme (the icon is
loaded at the symbolic size <span class="type">GTK_ICON_SIZE_DND</span>), thus 
<em class="parameter"><code>hot_x</code></em> and <em class="parameter"><code>hot_y</code></em> have to be used with care.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>the context for a drag. (This must be called
with a context for the source side of a drag)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></p></td>
<td>name of icon to use</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></p></td>
<td>the X offset of the hotspot within the icon</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></p></td>
<td>the Y offset of the hotspot within the icon</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-set-icon-default"></a><h3>gtk_drag_set_icon_default ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_set_icon_default           (<em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
<p>
Sets the icon for a particular drag to the default
icon.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>the context for a drag. (This must be called
with a  context for the source side of a drag)</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-check-threshold"></a><h3>gtk_drag_check_threshold ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_drag_check_threshold            (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> start_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> start_y</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> current_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> current_y</code></em>);</pre>
<p>
Checks to see if a mouse drag starting at (<em class="parameter"><code>start_x</code></em>, <em class="parameter"><code>start_y</code></em>) and ending
at (<em class="parameter"><code>current_x</code></em>, <em class="parameter"><code>current_y</code></em>) has passed the GTK+ drag threshold, and thus
should trigger the beginning of a drag-and-drop operation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_x</code></em> :</span></p></td>
<td>X coordinate of start of drag</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_y</code></em> :</span></p></td>
<td>Y coordinate of start of drag</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>current_x</code></em> :</span></p></td>
<td>current X coordinate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>current_y</code></em> :</span></p></td>
<td>current Y coordinate</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the drag threshold has been passed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-set"></a><h3>gtk_drag_source_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_set                 (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a> start_button_mask</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-Selections.html#GtkTargetEntry" title="struct GtkTargetEntry"><span class="type">GtkTargetEntry</span></a> *targets</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_targets</code></em>,
                                                         <em class="parameter"><code><a href="../gdk3/gdk3-Drag-and-Drop.html#GdkDragAction"><span class="type">GdkDragAction</span></a> actions</code></em>);</pre>
<p>
Sets up a widget so that GTK+ will start a drag operation when the user
clicks and drags on the widget. The widget must have a window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_button_mask</code></em> :</span></p></td>
<td>the bitmask of buttons that can start the drag</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
<td>the table of targets that the drag will support,
may be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_targets]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></p></td>
<td>the number of items in <em class="parameter"><code>targets</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>actions</code></em> :</span></p></td>
<td>the bitmask of possible actions for a drag from this widget</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-set-icon-pixbuf"></a><h3>gtk_drag_source_set_icon_pixbuf ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_set_icon_pixbuf     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
<p>
Sets the icon that will be used for drags from a particular widget
from a <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. GTK+ retains a reference for <em class="parameter"><code>pixbuf</code></em> and will 
release it when it is no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
<td>the <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> for the drag icon</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-set-icon-stock"></a><h3>gtk_drag_source_set_icon_stock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_set_icon_stock      (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>);</pre>
<p>
Sets the icon that will be used for drags from a particular source
to a stock icon.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
<td>the ID of the stock icon to use</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-set-icon-name"></a><h3>gtk_drag_source_set_icon_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_set_icon_name       (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>);</pre>
<p>
Sets the icon that will be used for drags from a particular source
to a themed icon. See the docs for <a class="link" href="gtk3-GtkIconTheme.html#GtkIconTheme" title="struct GtkIconTheme"><span class="type">GtkIconTheme</span></a> for more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></p></td>
<td>name of icon to use</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-unset"></a><h3>gtk_drag_source_unset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_unset               (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Unregister this widget as a drag source.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-set-target-list"></a><h3>gtk_drag_source_set_target_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_set_target_list     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a> *target_list</code></em>);</pre>
<p>
Changes the target types that this widget offers for drag-and-drop.
The widget must first be made into a drag source with
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set" title="gtk_drag_source_set ()"><code class="function">gtk_drag_source_set()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag source</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target_list</code></em> :</span></p></td>
<td>list of draggable targets, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-get-target-list"></a><h3>gtk_drag_source_get_target_list ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="returnvalue">GtkTargetList</span></a> *     gtk_drag_source_get_target_list     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Gets the list of targets this widget can provide for
drag-and-drop.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gtk3-Selections.html#GtkTargetList" title="GtkTargetList"><span class="type">GtkTargetList</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-add-text-targets"></a><h3>gtk_drag_source_add_text_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_add_text_targets    (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Add the text targets supported by <span class="type">GtkSelection</span> to
the target list of the drag source.  The targets
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value, 
use <a class="link" href="gtk3-Selections.html#gtk-target-list-add-text-targets" title="gtk_target_list_add_text_targets ()"><code class="function">gtk_target_list_add_text_targets()</code></a> and
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-target-list" title="gtk_drag_source_set_target_list ()"><code class="function">gtk_drag_source_set_target_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's is a drag source</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-add-image-targets"></a><h3>gtk_drag_source_add_image_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_add_image_targets   (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Add the writable image targets supported by <span class="type">GtkSelection</span> to
the target list of the drag source. The targets
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value, 
use <a class="link" href="gtk3-Selections.html#gtk-target-list-add-image-targets" title="gtk_target_list_add_image_targets ()"><code class="function">gtk_target_list_add_image_targets()</code></a> and
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-target-list" title="gtk_drag_source_set_target_list ()"><code class="function">gtk_drag_source_set_target_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's is a drag source</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-drag-source-add-uri-targets"></a><h3>gtk_drag_source_add_uri_targets ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_drag_source_add_uri_targets     (<em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Add the URI targets supported by <span class="type">GtkSelection</span> to
the target list of the drag source.  The targets
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value, 
use <a class="link" href="gtk3-Selections.html#gtk-target-list-add-uri-targets" title="gtk_target_list_add_uri_targets ()"><code class="function">gtk_target_list_add_uri_targets()</code></a> and
<a class="link" href="gtk3-Drag-and-Drop.html#gtk-drag-source-set-target-list" title="gtk_drag_source_set_target_list ()"><code class="function">gtk_drag_source_set_target_list()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> that's is a drag source</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>